home *** CD-ROM | disk | FTP | other *** search
- VERSION 2.00
- Begin Form CursorDemo
- Caption = "VB Custom Cursor Demo"
- ClientHeight = 5076
- ClientLeft = 1380
- ClientTop = 900
- ClientWidth = 7032
- Height = 5472
- Icon = CURSOR.FRX:0000
- Left = 1344
- LinkTopic = "Form3"
- ScaleHeight = 5076
- ScaleWidth = 7032
- Top = 540
- Width = 7104
- Begin PictureBox picCursorMask6
- Height = 510
- Left = 3060
- Picture = CURSOR.FRX:0302
- ScaleHeight = 41
- ScaleMode = 3 'Pixel
- ScaleWidth = 41
- TabIndex = 36
- Top = 4140
- Width = 510
- End
- Begin PictureBox picCursor6
- AutoRedraw = -1 'True
- Height = 510
- Left = 3060
- Picture = CURSOR.FRX:0604
- ScaleHeight = 41
- ScaleMode = 3 'Pixel
- ScaleWidth = 41
- TabIndex = 34
- Top = 3360
- Width = 510
- End
- Begin PictureBox picCursorMask5
- Height = 510
- Left = 2580
- Picture = CURSOR.FRX:0906
- ScaleHeight = 41
- ScaleMode = 3 'Pixel
- ScaleWidth = 41
- TabIndex = 33
- Top = 4140
- Width = 510
- End
- Begin PictureBox picCursor5
- AutoRedraw = -1 'True
- Height = 510
- Left = 2580
- Picture = CURSOR.FRX:0C08
- ScaleHeight = 41
- ScaleMode = 3 'Pixel
- ScaleWidth = 41
- TabIndex = 31
- Top = 3360
- Width = 510
- End
- Begin PictureBox picCursorMask0
- Height = 510
- Left = 180
- Picture = CURSOR.FRX:0F0A
- ScaleHeight = 41
- ScaleMode = 3 'Pixel
- ScaleWidth = 41
- TabIndex = 29
- Top = 4140
- Width = 510
- End
- Begin PictureBox picCursor0
- AutoRedraw = -1 'True
- Height = 510
- Left = 180
- Picture = CURSOR.FRX:120C
- ScaleHeight = 41
- ScaleMode = 3 'Pixel
- ScaleWidth = 41
- TabIndex = 28
- Top = 3360
- Width = 510
- End
- Begin OptionButton Option1
- Caption = "Option1"
- Height = 315
- Left = 4080
- TabIndex = 18
- Top = 3300
- Value = -1 'True
- Width = 1035
- End
- Begin OptionButton Option2
- Caption = "Option2"
- Height = 315
- Left = 4080
- TabIndex = 17
- Top = 3600
- Width = 1035
- End
- Begin VScrollBar VScroll2
- Height = 1335
- Left = 1380
- TabIndex = 16
- Top = 1260
- Width = 255
- End
- Begin VScrollBar VScroll1
- Height = 1335
- Left = 480
- TabIndex = 15
- Top = 1260
- Width = 255
- End
- Begin CommandButton Command1
- Caption = "Command1"
- Height = 495
- Left = 5640
- TabIndex = 14
- Top = 3480
- Width = 1215
- End
- Begin PictureBox picCursorMask4
- Height = 510
- Left = 2100
- Picture = CURSOR.FRX:150E
- ScaleHeight = 41
- ScaleMode = 3 'Pixel
- ScaleWidth = 41
- TabIndex = 13
- Top = 4140
- Width = 510
- End
- Begin PictureBox picCursorMask3
- Height = 510
- Left = 1620
- Picture = CURSOR.FRX:1810
- ScaleHeight = 41
- ScaleMode = 3 'Pixel
- ScaleWidth = 41
- TabIndex = 12
- Top = 4140
- Width = 510
- End
- Begin PictureBox picCursor4
- AutoRedraw = -1 'True
- Height = 510
- Left = 2100
- Picture = CURSOR.FRX:1B12
- ScaleHeight = 41
- ScaleMode = 3 'Pixel
- ScaleWidth = 41
- TabIndex = 11
- Top = 3360
- Width = 510
- End
- Begin PictureBox picCursor3
- AutoRedraw = -1 'True
- Height = 510
- Left = 1620
- Picture = CURSOR.FRX:1E14
- ScaleHeight = 41
- ScaleMode = 3 'Pixel
- ScaleWidth = 41
- TabIndex = 10
- Top = 3360
- Width = 510
- End
- Begin PictureBox picCursorMask2
- Height = 510
- Left = 1140
- Picture = CURSOR.FRX:2116
- ScaleHeight = 41
- ScaleMode = 3 'Pixel
- ScaleWidth = 41
- TabIndex = 7
- Top = 4140
- Width = 510
- End
- Begin PictureBox picCursor2
- AutoRedraw = -1 'True
- Height = 510
- Left = 1140
- Picture = CURSOR.FRX:2418
- ScaleHeight = 41
- ScaleMode = 3 'Pixel
- ScaleWidth = 41
- TabIndex = 6
- Top = 3360
- Width = 510
- End
- Begin TextBox Text2
- Height = 1335
- Left = 3900
- MultiLine = -1 'True
- TabIndex = 5
- Text = "x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x"
- Top = 1320
- Width = 1275
- End
- Begin PictureBox picCursorMask1
- Height = 510
- Left = 660
- Picture = CURSOR.FRX:271A
- ScaleHeight = 41
- ScaleMode = 3 'Pixel
- ScaleWidth = 41
- TabIndex = 4
- Top = 4140
- Width = 510
- End
- Begin PictureBox picCursor1
- AutoRedraw = -1 'True
- Height = 510
- Left = 660
- Picture = CURSOR.FRX:2A1C
- ScaleHeight = 41
- ScaleMode = 3 'Pixel
- ScaleWidth = 41
- TabIndex = 3
- Top = 3360
- Width = 510
- End
- Begin CommandButton cmdExit
- Caption = "E&xit"
- Height = 495
- Left = 5640
- TabIndex = 2
- Top = 4080
- Width = 1215
- End
- Begin TextBox Text1
- Height = 1335
- Left = 2400
- MousePointer = 3 'I-Beam
- MultiLine = -1 'True
- TabIndex = 0
- Text = "x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x"
- Top = 1320
- Width = 1275
- End
- Begin Label Label10
- Caption = "Image1"
- Height = 195
- Left = 5820
- TabIndex = 38
- Top = 2220
- Width = 630
- End
- Begin Image Image1
- Height = 384
- Left = 5880
- Picture = CURSOR.FRX:2D1E
- Top = 2520
- Width = 384
- End
- Begin Label Label1
- BorderStyle = 1 'Fixed Single
- Caption = "Label1"
- Height = 495
- Left = 5580
- TabIndex = 37
- Top = 1320
- Width = 1215
- End
- Begin Label Label9
- Alignment = 2 'Center
- Caption = "6"
- Height = 195
- Index = 6
- Left = 3180
- TabIndex = 35
- Top = 3900
- Width = 240
- End
- Begin Label Label9
- Alignment = 2 'Center
- Caption = "5"
- Height = 195
- Index = 5
- Left = 2700
- TabIndex = 32
- Top = 3900
- Width = 240
- End
- Begin Label Label9
- Alignment = 2 'Center
- Caption = "4"
- Height = 195
- Index = 4
- Left = 2220
- TabIndex = 30
- Top = 3900
- Width = 240
- End
- Begin Label Label9
- Alignment = 2 'Center
- Caption = "3"
- Height = 195
- Index = 3
- Left = 1740
- TabIndex = 27
- Top = 3900
- Width = 240
- End
- Begin Label Label9
- Alignment = 2 'Center
- Caption = "2"
- Height = 195
- Index = 2
- Left = 1260
- TabIndex = 26
- Top = 3900
- Width = 240
- End
- Begin Label Label9
- Alignment = 2 'Center
- Caption = "1"
- Height = 195
- Index = 1
- Left = 780
- TabIndex = 25
- Top = 3900
- Width = 240
- End
- Begin Label Label9
- Alignment = 2 'Center
- Caption = "0"
- Height = 195
- Index = 0
- Left = 300
- TabIndex = 24
- Top = 3900
- Width = 240
- End
- Begin Label Label8
- Caption = "cmdExit"
- Height = 195
- Left = 5940
- TabIndex = 23
- Top = 4620
- Width = 675
- End
- Begin Label Label7
- Caption = "Text2"
- Height = 195
- Left = 4260
- TabIndex = 22
- Top = 1020
- Width = 495
- End
- Begin Label Label6
- Caption = "Text1"
- Height = 195
- Left = 2760
- TabIndex = 21
- Top = 1020
- Width = 495
- End
- Begin Label Label4
- Caption = "VScroll2"
- Height = 195
- Left = 1140
- TabIndex = 20
- Top = 960
- Width = 720
- End
- Begin Label Label11
- Caption = "VScroll1"
- Height = 195
- Left = 240
- TabIndex = 19
- Top = 960
- Width = 720
- End
- Begin Label Label5
- Caption = "picCursorMask"
- Height = 195
- Left = 1320
- TabIndex = 9
- Top = 4680
- Width = 1260
- End
- Begin Label Label2
- AutoSize = -1 'True
- Caption = "picCursor"
- Height = 195
- Left = 1500
- TabIndex = 8
- Top = 3120
- Width = 810
- End
- Begin Line Line1
- BorderWidth = 2
- X1 = 660
- X2 = 6600
- Y1 = 660
- Y2 = 660
- End
- Begin Label Label3
- Caption = "Move the mouse pointer over the form and controls to see the cursor changes. Use the mouse on the controls to test the hot spots."
- ForeColor = &H00FF0000&
- Height = 435
- Left = 720
- TabIndex = 1
- Top = 120
- Width = 6015
- WordWrap = -1 'True
- End
- Dim ciForm As CursorInfo
- Dim ciVScroll As CursorInfo
- Dim ciText As CursorInfo
- Dim ciOption As CursorInfo
- Dim ciCommand As CursorInfo
- Dim ciLabel As CursorInfo
- Dim ciImage As CursorInfo
- Sub CheckFormCursor (hCursor As Integer)
- Static hFormCursor As Integer
- If hFormCursor <> hCursor Then
- z% = ChangeCursor(ciForm.hWnd, hCursor)
- hFormCursor = hCursor
- End If
- End Sub
- Sub cmdExit_Click ()
- Unload CursorDemo
- End Sub
- Sub Form_Load ()
- MakeCursor CursorDemo.hWnd, picCursor0, picCursorMask0, ciForm
- MakeCursor Command1.hWnd, picCursor1, picCursorMask1, ciCommand
- MakeCursor Text1.hWnd, picCursor2, picCursorMask2, ciText
- MakeCursor Option1.hWnd, picCursor3, picCursorMask3, ciOption
- MakeCursor VScroll1.hWnd, picCursor4, picCursorMask4, ciVScroll
- MakeCursor CursorDemo.hWnd, picCursor5, picCursorMask5, ciImage
- MakeCursor CursorDemo.hWnd, picCursor6, picCursorMask6, ciLabel
- CheckFormCursor ciForm.hNewCursor
- End Sub
- Sub Form_MouseMove (Button As Integer, Shift As Integer, X As Single, Y As Single)
- CheckFormCursor ciForm.hNewCursor
- End Sub
- Sub Form_Unload (Cancel As Integer)
- RestoreCursor ciVScroll
- RestoreCursor ciText
- RestoreCursor ciOption
- RestoreCursor ciCommand
- RestoreCursor ciLabel
- RestoreCursor ciImage
- RestoreCursor ciForm
- End
- End Sub
- Sub Image1_MouseMove (Button As Integer, Shift As Integer, X As Single, Y As Single)
- CheckFormCursor ciImage.hNewCursor
- End Sub
- Sub Label1_MouseMove (Button As Integer, Shift As Integer, X As Single, Y As Single)
- CheckFormCursor ciLabel.hNewCursor
- End Sub
-